# @configure_input@

# Userspace Software iWARP library for DPDK
#
# Authors: Patrick MacArthur <patrick@patrickmacarthur.net>
#
# Copyright (c) 2016-2018, University of New Hampshire
#
# This software is available to you under a choice of one of two
# licenses.  You may choose to be licensed under the terms of the GNU
# General Public License (GPL) Version 2, available from the file
# COPYING in the main directory of this source tree, or the
# BSD license below:
#
#   Redistribution and use in source and binary forms, with or
#   without modification, are permitted provided that the following
#   conditions are met:
#
#   - Redistributions of source code must retain the above copyright notice,
#     this list of conditions and the following disclaimer.
#
#   - Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#
#   - Neither the name of IBM nor the names of its contributors may be
#     used to endorse or promote products derived from this software without
#     specific prior written permission.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


SOURCES = ae.c backports.h cm.c cm.h debug.c debug.h main.c mem.c \
	  obj.c obj.h qp.c urdma.h verbs.c verbs.h Kbuild

ifeq ($(WANT_DEBUG),yes)
export CONFIG_URDMA_DEBUG = y
endif

kmod_prefix=@kmod_prefix@

.PHONY: all
all:
	for i in $(SOURCES); do if [ ! -e $${i} ]; then ln -s @srcdir@/$${i} $${i}; fi; done
	if [ ! -e urdma_kabi.h ]; then ln -s @top_srcdir@/include/urdma_kabi.h .; fi
	if [ ! -e proto_trp.h ]; then ln -s @top_srcdir@/include/proto_trp.h .; fi
	make -C @KERNELDIR@ M=`pwd` top_srcdir=$(realpath @top_srcdir@) PACKAGE_VERSION='\"@PACKAGE_VERSION@\"' modules

Makefile: @srcdir@/Makefile.in
	cd @top_builddir@; ./config.status

.PHONY: distdir
distdir:
	for i in $(SOURCES); do cp @srcdir@/$${i} $(distdir)/$${i}; done

.PHONY: install
install: install-exec install-data

.PHONY: install-exec
install-exec:
	make -C @KERNELDIR@ M=`pwd` INSTALL_MOD_PATH=$(DESTDIR)/$(kmod_prefix) modules_install

install-data:

uninstall:

install-dvi:

install-html:

install-info:

install-ps:

install-pdf:

installdirs:

check:

installcheck:

.PHONY: mostlyclean
mostlyclean:
	make -C @KERNELDIR@ M=`pwd` clean
	$(RM) *.o.ur-safe

.PHONY: clean
clean: mostlyclean
	for i in $(SOURCES); do if [ -h $${i} ]; then $(RM) $${i}; fi; done
	$(RM) urdma_kabi.h
	$(RM) .cache.mk

.PHONY: distclean
distclean: clean
	$(RM) Makefile

.PHONY: maintainer-clean
maintainer-clean: distclean

dvi:

pdf:

ps:

info:

html:

tags:

.PHONY: ctags
ctags: Makefile
	ctags $(SOURCES)
